#ifndef SPRQUAD_H
#define SPRQUAD_H

#include "Quad.h"
#include <SFML/Graphics/Vertex.hpp>
#include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/Time.hpp>
#include <memory>
#include <vector>


class SprQuad : public Quad
{
public:
	SprQuad(
		int id,
		int timeline,
		float width,
		float height,
		const sf::Vector2f& t1,
		const sf::Vector2f& t2,
		const sf::Vector2f& t3,
		const sf::Vector2f& t4,
		const sf::Vector2f& origin = sf::Vector2f(0.f, 0.f),
		float mDepth = 0.0f);


	void					setTexCoord(const sf::Vector2f& t1, const sf::Vector2f& t2,
								const sf::Vector2f& t3, const sf::Vector2f& t4);
	void					mirrorTexture();
	void					setDimensions(float width, float height, sf::Vector2f origing);
	
	sf::Vertex&				operator[](int);

	bool					operator<(const SprQuad& rho);
	
	sf::Vertex				getWorldVertex(int i);	

	//for zDepth ordering greater values are on top
	void					setDepth(float depth);
	float					getDepth() const;

private:
	sf::Vertex&				getVertex(int i);

private:
	float					mDepth;
	sf::Vertex				mV1, mV2, mV3, mV4;
};


#endif